import Button from "@/components/Button";

export default {
    install(Vue){
        //1.添加全局方法或者属性
        Vue.prototype.$bus = "bus";
        //2.添加全局指令
        Vue.directive("red",(el,binding)=>{
            el.style.background = "red"
        });
        //3.添加全局指令
        Vue.filter("add$",(value)=>{
            return "$" + value;
        });
        //4.添加一个全局注册的组件
        Vue.component(Button,"Button");
    }
}